package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum CourseAuthEnum {
    PUBLIC((byte) 0, "公开"),
    ONLY_MEMBER((byte) 1, "仅会员可见"),
    ONLY_BUY((byte) 2, "仅购买者可见"),
    MEMBER_OR_BUY((byte) 3, "会员或购买者可见"),
    ;

    private Byte type;
    private String remark;

    CourseAuthEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (CourseAuthEnum item : CourseAuthEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
